import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib as mpl
import warnings
warnings.filterwarnings("ignore")

# col1 = np.linspace(0, 10, 1000)
# col2 = np.sin(col1)
# df = pd.DataFrame({"C1" : col1 , "C2" :col2})
# pd.set_option('display.max_columns', None)
# print(df.head(10))
#
# #Plotting lineplot using sns.lineplot()
# plt.style.use('seaborn-darkgrid')
# #matplotlib inline
# sns.lineplot(x=df.C1,y=df.C2,data=df)
# plt.show()

########################################################################################
spotify = pd.read_csv('spotify.csv', index_col='Date')
pd.set_option('display.max_columns', None)
#print(spotify.head(10))
spotify.index = pd.to_datetime(spotify.index)
plt.figure(figsize=(20, 8))
sns.lineplot(data=spotify)
plt.show()

# plt.figure(figsize=(20, 8))
# plt.plot(spotify['Despacito'], label='Despacito')
# plt.plot(spotify['Shape of You'], label='Shape of You')
# plt.plot(spotify['Unforgettable'], label='Unforgettable')
# plt.plot(spotify['HUMBLE.'], label='HUMBLE.')
# plt.plot(spotify['Something Just Like This'], label='Something Just Like This')
# plt.legend()
# plt.show()
#
# plt.figure(figsize=(20, 8))
# plt.plot(spotify['Despacito'], label='Despacito')
# plt.plot(spotify['Shape of You'], label='Shape of You')
# plt.show()

employment = pd.read_excel('unemployment.xlsx')
print(employment.head(10))
plt.figure(figsize=(14, 7))
plt.style.use('seaborn-darkgrid')
sns.lineplot(x='Period', y='Unemployed', hue='Gender', data=employment)
plt.show()

plt.figure(figsize=(14, 7))
plt.style.use('seaborn-darkgrid')
sns.lineplot(x='Period', y='Unemployed', hue='Gender', style='Gender', markers=True, dashes=False, data=employment)
plt.show()

plt.figure(figsize=(14, 7))
plt.style.use('seaborn-darkgrid')
sns.lineplot(x='Period', y='Unemployed', hue='Gender', style='Gender', err_style='bars', ci=70, data=employment)
plt.show()

plt.figure(figsize=(14, 7))
plt.style.use('seaborn-darkgrid')
sns.set(rc={'xtick.labelsize':17,'ytick.labelsize':10,'axes.labelsize':15, 'axes.grid':False})
sns.lineplot(x='Period', y='Unemployed', hue='Gender', style='Gender',data=employment,
             dashes=False, palette='CMRmap', markers=['o', '>'])
plt.show()

plt.figure(figsize=(14, 7))
plt.style.use('seaborn-darkgrid')
plt.gcf().text(.2, .84, 'GENDER', fontsize=40, color='Black')
sns.lineplot(x='Period', y='Unemployed', hue='Gender', style='Gender', data=employment)
plt.show()







